
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
#pragma OPENCL EXTENSION cl_khr_subgroups : enable

__kernel void test_reduce_max(__global int* out, __global int* in) {
    int val = in[get_global_id(0)];
    int maxv = sub_group_reduce_max(val);
    out[get_global_id(0)] = maxv;
}